package com.zhijian.wharf.dao;


import com.zhijian.wharf.entity.po.UserGroup;
import com.zhijian.wharf.entity.vo.request.UserGroupSearchVo;
import com.zhijian.wharf.entity.vo.response.UserGroupVo;

import java.util.List;

public interface UserGroupMapper {
    int deleteByPrimaryKey(Long id);

    /**
     * 根据用户ID删除
     *
     * @param userId
     * @return
     */
    int deleteByUserId(Long userId);

    int insert(UserGroup record);

    int insertSelective(UserGroup record);

    UserGroup selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserGroup record);

    int updateByPrimaryKey(UserGroup record);

    int count(UserGroupSearchVo userGroupSearchVo);

    List<UserGroupVo> selectList(UserGroupSearchVo userGroupSearchVo);

    UserGroupVo selectVoById(Long id);

    /**
     * 根据人员id查询所有的部门id
     *
     * @param userId
     * @return
     */
    List<Long> selectGroupIdsByUserId(Long userId);
}